package com.commonApp.schedular;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

import com.commonApp.schedular.task.WebServiceTask;

public class WebServiceSchedular extends QuartzJobBean implements StatefulJob{
	
	private final Log log = LogFactory.getLog(WebServiceSchedular.class);
	
	@Autowired
	private WebServiceTask webServiceTask;

	public WebServiceTask getWebServiceTask() {
		return webServiceTask;
	}

	public void setWebServiceTask(WebServiceTask webServiceTask) {
		this.webServiceTask = webServiceTask;
	}
	
	protected void executeInternal(JobExecutionContext context)	throws JobExecutionException {
	 
		log.info("INSIDE WebServiceSchedular.executeInternal method :::");
		webServiceTask.printTask();
	 
	}

}
